<?php
namespace app\home\controller;
use think\Controller;
use think\View;
use think\Db;
use think\Url;
use think\Request;
use app\admin\models\Goods;
use app\admin\models\Brand;
use app\admin\models\Attachment;
class Single extends Controller
{
    public function Single()
    {	
    	$goods_id=input('param.goods_id');  
    	if($goods_id){
    		$goods= Goods::get($goods_id)->toArray();
    		$form_uniqid=$goods['form_uniqid'];
    		$this->assign('goods',$goods); 
    		$imgs= Attachment::all(['form_uniqid'=>$form_uniqid])->toArray();
    		$this->assign('imgs',$imgs);
    	}else{
    		
    	}
    	$bd=Brand::all()->toArray();
    		$this->assign('bd',$bd);
	 return $this->fetch('Single');
	
	}
	
	
}
?>